package com.itheima.file;

import java.io.File;
import java.io.IOException;

public class Demo2 {
    public static void main(String[] args) throws IOException {
        //创建aaa文件
        //demo1();
        //创建文件bbb
        //demo2();
        //创建a.txt文件
        //demo3();
        //demo4();
        //demo5();
        //demo6();


    }

    public static void demo6() {
        File file=new File("可变参数和stream流\\aaa");
        boolean delete = file.delete();
        System.out.println(delete);
    }

    public static void demo5() {
        File file=new File("可变参数和stream流\\bbb");
        boolean delete = file.delete();
        System.out.println(delete);
    }

    public static void demo4() {
        File file=new File("可变参数和stream流\\bbb","a.txt");
        boolean delete = file.delete();
        System.out.println(delete);
    }

    public static void demo3() throws IOException {
        File file=new File("可变参数和stream流\\bbb","a.txt");
        boolean newFile = file.createNewFile();
        System.out.println(newFile);
    }

    public static void demo2() {
        File file=new File("可变参数和stream流\\bbb");
        boolean mkdirs = file.mkdirs();
        System.out.println(mkdirs);
    }

    public static void demo1() {
        File file=new File("可变参数和stream流\\aaa");
        boolean mkdirs = file.mkdirs();
        System.out.println(mkdirs);
    }
}
